Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move quarantine module into the provenance repo (from our fork) #1754

Closed
wants to merge 24 commits into from

Conversation

SpicyLemon
Copy link
Contributor

@SpicyLemon SpicyLemon commented Nov 18, 2023

Description

closes: #1752

This copies the quarantine module stuff from our SDK fork into this repo. It also updates all references to the quarantine module to point to this new copy instead of the one from the SDK. The only exception is errors.go (more on that below). The testutil/bank/cli_helpers.go file was copied in from x/bank/client/testutil/cli_helpers.go too (since that doesn't come with a library import).

  • Protos:
    • Changed the proto packages to provenance.quarantine.v1 (from cosmos.quarantine.v1beta1).
    • Changed the proto go_package values to "github.com/provenance-io/provenance/x/quarantine" (from "github.com/cosmos/cosmos-sdk/x/quarantine").
    • Changed the REST query URLs to start with /provenance/quarantine/v1 (from /cosmos/quarantine/v1beta1).
    • Renamed the QueryQuarantinedFundsResponse.quarantinedFunds field to quarantined_funds(to appease the linter).
  • Go Code:
    • Updated imports to use the stuff in this repo (instead of what the SDK has).
    • In codec.go, removed the legacy amino codec stuff and switched to the allRequestMsgs pattern.
    • Fix cli_test.go, keeper_test.go, genesis_test.go, and operations_test.go to create the correct chain, and fix the expected event type strings.
    • Comment out errors.go and replace it with renaming the SDK version of the errors and add a comment about updating it later. Since both the SDK version and this new copy has the same namespace and codes, when we try to .Register the errors, it panics. So for now, I'm having it just rename the SDK ones. Once that's been deleted from the SDK, we fix this errors.go as we pull in that new version. This should be the only reference to the SDK's version of the quarantine module.
    • In module.go empty out the RegisterLegacyAminoCodec function.
    • Lint fixes in cli/util.go (++ instead of += 1), in keys.go (variable named recordID used to be named recordId), in quarantine.go (unneeded if/return), in operations.go (_ an unused argument and fix a shadowed variable).
    • Regenerated go code from updated protos.
  • Spec Docs:
    • Removed order comments.
    • Update msg and query proto links.
    • Updated event type strings.
    • Switched to provenanced (from simd) for the commands, and use pb addresses for the examples.

Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against correct branch (see CONTRIBUTING.md)
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Wrote unit and integration tests
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer
  • Review Codecov Report in the comment section below once CI passes

…tead of v1beta1. Regenerate the go stuff from that change.
…e it doesn't come with the impoort (and is needed by the quarantine tests).
…or the quarantine and sanction error codes, but is otherwise exactly the same as v0.46.13-pio-2.
… was causing problems due to double registration.
…x a couple event tests to expect the new type.
Copy link

codecov bot commented Nov 18, 2023

Codecov Report

Merging #1754 (331aca2) into main (5553cbd) will increase coverage by 0.02%.
Report is 2 commits behind head on main.
The diff coverage is 74.53%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1754      +/-   ##
==========================================
+ Coverage   74.01%   74.04%   +0.02%     
==========================================
  Files         295      313      +18     
  Lines       44072    46216    +2144     
==========================================
+ Hits        32622    34220    +1598     
- Misses      10087    10589     +502     
- Partials     1363     1407      +44     
Files Coverage Δ
app/app.go 84.89% <ø> (ø)
cmd/provenanced/cmd/root.go 72.06% <100.00%> (+0.17%) ⬆️
x/exchange/keeper/keeper.go 94.70% <ø> (ø)
x/quarantine/client/cli/util.go 100.00% <100.00%> (ø)
x/quarantine/genesis.go 100.00% <100.00%> (ø)
x/quarantine/keeper/invariants.go 100.00% <100.00%> (ø)
x/quarantine/keys.go 100.00% <100.00%> (ø)
x/quarantine/msgs.go 100.00% <100.00%> (ø)
x/quarantine/quarantine.go 100.00% <100.00%> (ø)
x/quarantine/send_restriction.go 100.00% <100.00%> (ø)
... and 13 more

@SpicyLemon
Copy link
Contributor Author

I'm not sure if it's possible to create a github link that shows the changes made in this PR, so I did the diffs locally, manually (from this branch to main-pio at commit f42c2487f7 (Prevent locked coins from being delegated. (#582)).

In all of these, PWD is the root of this repo, and ../prov-cosmos-sdk is the root of our fork of the SDK repo.


Protos

Command:

$ diff -r --color --ignore-matching-lines='^package' --ignore-matching-lines='^option go_package ' --ignore-matching-lines='^import ' ../prov-cosmos-sdk/proto/cosmos/quarantine/v1beta1 proto/provenance/quarantine/v1

query.proto:

15c15
<     option (google.api.http).get = "/cosmos/quarantine/v1beta1/active/{to_address}";
---
>     option (google.api.http).get = "/provenance/quarantine/v1/active/{to_address}";
26,32c26,28
<       get: "/cosmos/quarantine/v1beta1/funds"
<       additional_bindings: {
<         get: "/cosmos/quarantine/v1beta1/funds/{to_address}"
<       }
<       additional_bindings: {
<         get: "/cosmos/quarantine/v1beta1/funds/{to_address}/{from_address}"
<       }
---
>       get: "/provenance/quarantine/v1/funds"
>       additional_bindings: {get: "/provenance/quarantine/v1/funds/{to_address}"}
>       additional_bindings: {get: "/provenance/quarantine/v1/funds/{to_address}/{from_address}"}
42,45c38,39
<       get: "/cosmos/quarantine/v1beta1/auto/{to_address}"
<       additional_bindings: {
<         get: "/cosmos/quarantine/v1beta1/auto/{to_address}/{from_address}"
<       }
---
>       get: "/provenance/quarantine/v1/auto/{to_address}"
>       additional_bindings: {get: "/provenance/quarantine/v1/auto/{to_address}/{from_address}"}
75,76c69,70
<   // quarantinedFunds is info about coins sitting in quarantine.
<   repeated QuarantinedFunds quarantinedFunds = 1;
---
>   // quarantined_funds is info about coins sitting in quarantine.
>   repeated QuarantinedFunds quarantined_funds = 1;

Go Code

Command:

$ diff -r --color -B --ignore-matching-lines='github.com' ../prov-cosmos-sdk/x/quarantine x/quarantine

I then manually removed the spec-docs (see below) and auto-generated files.

`client/cli/util.go`
70c72
<           arArgCount += 1
---
>           arArgCount++
75c77
<           arAddrCount += 1
---
>           arAddrCount++
`client/testutil/cli_test.go`
16,18c17,20
<   cfg := network.DefaultConfig()
<   cfg.NumValidators = 2
<   cfg.TimeoutCommit = 1 * time.Second
---
>   pioconfig.SetProvenanceConfig("stake", 0)
>   cfg := testutil.DefaultTestNetworkConfig()
>   cfg.NumValidators = 1
>   cfg.TimeoutCommit = 500 * time.Millisecond
`codec.go`
13,22c11
< // RegisterLegacyAminoCodec registers all the necessary types and interfaces for the
< // governance module.
< func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {
<   legacy.RegisterAminoMsg(cdc, &MsgOptIn{}, "cosmos-sdk/MsgQuarantineOptIn")
<   legacy.RegisterAminoMsg(cdc, &MsgOptOut{}, "cosmos-sdk/MsgQuarantineOptOut")
<   legacy.RegisterAminoMsg(cdc, &MsgAccept{}, "cosmos-sdk/MsgQuarantineAccept")
<   legacy.RegisterAminoMsg(cdc, &MsgDecline{}, "cosmos-sdk/MsgQuarantineDecline")
<   legacy.RegisterAminoMsg(cdc, &MsgUpdateAutoResponses{}, "cosmos-sdk/MsgUpdateQuarantineAutoResp")
< }
< 
---
> // x  v
24,30c13,17
<   registry.RegisterImplementations((*sdk.Msg)(nil),
<       &MsgOptIn{},
<       &MsgOptOut{},
<       &MsgAccept{},
<       &MsgDecline{},
<       &MsgUpdateAutoResponses{},
<   )
---
>   messages := make([]proto.Message, len(allRequestMsgs))
>   for i, msg := range allRequestMsgs {
>       messages[i] = msg
>   }
>   registry.RegisterImplementations((*sdk.Msg)(nil), messages...)
33,54d19
< }
< 
< var (
<   amino = codec.NewLegacyAmino()
< 
<   // ModuleCdc references the global x/quarantine module codec. Note, the codec should
<   // ONLY be used in certain instances of tests and for JSON encoding as Amino is
<   // still used for that purpose.
<   //
<   // The actual codec used for serialization should be provided to x/quarantine and
<   // defined at the application level.
<   ModuleCdc = codec.NewAminoCodec(amino)
< )
< 
< func init() {
<   RegisterLegacyAminoCodec(amino)
<   cryptocodec.RegisterCrypto(amino)
<   sdk.RegisterLegacyAminoCodec(amino)
< 
<   // Register all Amino interfaces and concrete types on the authz Amino codec so that this can later be
<   // used to properly serialize MsgGrant and MsgExec instances
<   RegisterLegacyAminoCodec(authzcodec.Amino)
`errors/errors.go`
3c3
< import "cosmossdk.io/errors"
---
> import sdkqerrs "github.com/cosmos/cosmos-sdk/x/quarantine/errors"
5,6c5
< // quarantineCodespace is the codespace for all errors defined in quarantine package
< const quarantineCodespace = "quarantine"
---
> var ErrInvalidValue = sdkqerrs.ErrInvalidValue
8c7,19
< var ErrInvalidValue = errors.Register(quarantineCodespace, 2, "invalid value")
---
> // TODO: Once we have an official version of the SDK without the quarantine module:
> //       1. Delete everything above this comment.
> //       2. Uncomment everything below this comment.
> //       3. Delete this comment.
> 
> // package errors
> //
> // import cerrs "cosmossdk.io/errors"
> //
> // // quarantineCodespace is the codespace for all errors defined in quarantine package
> // const quarantineCodespace = "quarantine"
> //
> // var ErrInvalidValue = cerrs.Register(quarantineCodespace, 2, "invalid value")
`keeper/keeper_test.go`
71c71
<   app        *simapp.SimApp
---
>   app        *app.App
87c87
<   s.app = simapp.Setup(s.T(), false)
---
>   s.app = app.Setup(s.T())
93c93
<   addrs := simapp.AddTestAddrsIncremental(s.app, s.sdkCtx, 5, sdk.NewInt(1_000_000_000))
---
>   addrs := app.AddTestAddrsIncremental(s.app, s.sdkCtx, 5, sdk.NewInt(1_000_000_000))
181c181
<               Type: "cosmos.quarantine.v1beta1.EventOptIn",
---
>               Type: "provenance.quarantine.v1.EventOptIn",
201c201
<               Type: "cosmos.quarantine.v1beta1.EventOptOut",
---
>               Type: "provenance.quarantine.v1.EventOptOut",
`keys.go`
102,103c102,103
<   recordId := address.MustLengthPrefix(createRecordSuffix(fromAddrs))
<   return MakeKey(toAddrPreBz, recordId)
---
>   recordID := address.MustLengthPrefix(createRecordSuffix(fromAddrs))
>   return MakeKey(toAddrPreBz, recordID)
165,166c165,166
<   recordId := address.MustLengthPrefix(fromAddr)
<   return MakeKey(toAddrPreBz, recordId)
---
>   recordID := address.MustLengthPrefix(fromAddr)
>   return MakeKey(toAddrPreBz, recordID)
`module/module.go`
94,96c96
< func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {
<   quarantine.RegisterLegacyAminoCodec(cdc)
< }
---
> func (AppModuleBasic) RegisterLegacyAminoCodec(_ *codec.LegacyAmino) {}
`msgs.go`
4c4,5
<   "cosmossdk.io/errors"
---
>   cerrs "cosmossdk.io/errors"
> 
10c12,18
< var _ sdk.Msg = &MsgOptIn{}
---
> var allRequestMsgs = []sdk.Msg{
>   (*MsgOptIn)(nil),
>   (*MsgOptOut)(nil),
>   (*MsgAccept)(nil),
>   (*MsgDecline)(nil),
>   (*MsgUpdateAutoResponses)(nil),
> }
33,34d40
< var _ sdk.Msg = &MsgOptOut{}
< 
56,57d61
< var _ sdk.Msg = &MsgAccept{}
< 
89,90d92
< var _ sdk.Msg = &MsgDecline{}
< 
122,123d123
< var _ sdk.Msg = &MsgUpdateAutoResponses{}
< 
142c142
<           return errors.Wrapf(err, "invalid update %d", i+1)
---
>           return cerrs.Wrapf(err, "invalid update %d", i+1)
`quarantine.go`
75c76
<       return errors.ErrInvalidValue.Wrap("at least one unaccepted from address is required")
---
>       return qerrors.ErrInvalidValue.Wrap("at least one unaccepted from address is required")
83c84
<           return errors.ErrInvalidValue.Wrapf("duplicate unaccepted from address: %q", addr)
---
>           return qerrors.ErrInvalidValue.Wrapf("duplicate unaccepted from address: %q", addr)
87,90c88
<   if err := f.Coins.Validate(); err != nil {
<       return err
<   }
<   return nil
---
>   return f.Coins.Validate()
111c109
<       return errors.ErrInvalidValue.Wrapf("unknown auto-response value: %d", e.Response)
---
>       return qerrors.ErrInvalidValue.Wrapf("unknown auto-response value: %d", e.Response)
122c120
<       return errors.ErrInvalidValue.Wrapf("unknown auto-response value: %d", u.Response)
---
>       return qerrors.ErrInvalidValue.Wrapf("unknown auto-response value: %d", u.Response)
197c195
<       return errors.ErrInvalidValue.Wrap("at least one unaccepted from address is required")
---
>       return qerrors.ErrInvalidValue.Wrap("at least one unaccepted from address is required")
`simulation/genesis_test.go`
116,117c120,121
<           app := simapp.Setup(t, false)
<           ctx := app.BaseApp.NewContext(false, tmproto.Header{})
---
>           testApp := app.Setup(t)
>           ctx := testApp.BaseApp.NewContext(false, tmproto.Header{})
120c124
<               app.BankKeeper.InitGenesis(ctx, &bankGen)
---
>               testApp.BankKeeper.InitGenesis(ctx, &bankGen)
125c129
<               app.QuarantineKeeper.InitGenesis(ctx, &randomGenState)
---
>               testApp.QuarantineKeeper.InitGenesis(ctx, &randomGenState)
131c135
<               actualGenState = app.QuarantineKeeper.ExportGenesis(ctx)
---
>               actualGenState = testApp.QuarantineKeeper.ExportGenesis(ctx)
`simulation/operations.go`
50c51
<   ak quarantine.AccountKeeper, bk quarantine.BankKeeper, k keeper.Keeper, appCdc cdctypes.AnyUnpacker,
---
>   ak quarantine.AccountKeeper, bk quarantine.BankKeeper, k keeper.Keeper, _ cdctypes.AnyUnpacker,
368,369c369,370
<           acct, _ := simtypes.RandomAcc(r, accs)
<           entry.FromAddress = acct.Address.String()
---
>           rAcct, _ := simtypes.RandomAcc(r, accs)
>           entry.FromAddress = rAcct.Address.String()
`simulation/operations_test.go`
24c26
<   app *simapp.SimApp
---
>   app *app.App
48c50
<   s.app = simapp.Setup(s.T(), false)
---
>   s.app = app.Setup(s.T())

Spec

Command:

$ diff -r --color ../prov-cosmos-sdk/x/quarantine/spec x/quarantine/spec
`README.md`
1,7d0
< <!--
< order: 0
< title: Quarantine Overview
< parent:
<   title: "quarantine"
< -->
< 
`01_concepts.md`
1,4d0
< <!--
< order: 1
< -->
< 
`02_state.md`
1,4d0
< <!--
< order: 2
< -->
< 
`03_messages.md`
1,4d0
< <!--
< order: 3
< -->
< 
12c8
< +++ https://github.com/provenance-io/cosmos-sdk/blob/da2ea8a8139ae9e110de0776baffa1d0dd97db5e/proto/cosmos/quarantine/v1beta1/tx.proto#L33-L38
---
> +++ https://github.com/provenance-io/provenance/blob/723debe379d80419067416316ae07a8aea24dd8a/proto/provenance/quarantine/v1/tx.proto#L32-L37
21c17
< +++ https://github.com/provenance-io/cosmos-sdk/blob/da2ea8a8139ae9e110de0776baffa1d0dd97db5e/proto/cosmos/quarantine/v1beta1/tx.proto#L43-L48
---
> +++ https://github.com/provenance-io/provenance/blob/723debe379d80419067416316ae07a8aea24dd8a/proto/provenance/quarantine/v1/tx.proto#L42-L47
31c27
< +++ https://github.com/provenance-io/cosmos-sdk/blob/da2ea8a8139ae9e110de0776baffa1d0dd97db5e/proto/cosmos/quarantine/v1beta1/tx.proto#L53-L67
---
> +++ https://github.com/provenance-io/provenance/blob/723debe379d80419067416316ae07a8aea24dd8a/proto/provenance/quarantine/v1/tx.proto#L52-L66
47c43
< +++ https://github.com/provenance-io/cosmos-sdk/blob/da2ea8a8139ae9e110de0776baffa1d0dd97db5e/proto/cosmos/quarantine/v1beta1/tx.proto#L69-L74
---
> +++ https://github.com/provenance-io/provenance/blob/723debe379d80419067416316ae07a8aea24dd8a/proto/provenance/quarantine/v1/tx.proto#L68-L73
55c51
< +++ https://github.com/provenance-io/cosmos-sdk/blob/da2ea8a8139ae9e110de0776baffa1d0dd97db5e/proto/cosmos/quarantine/v1beta1/tx.proto#L76-L90
---
> +++ https://github.com/provenance-io/provenance/blob/723debe379d80419067416316ae07a8aea24dd8a/proto/provenance/quarantine/v1/tx.proto#L75-L89
74c70
< +++ https://github.com/provenance-io/cosmos-sdk/blob/da2ea8a8139ae9e110de0776baffa1d0dd97db5e/proto/cosmos/quarantine/v1beta1/tx.proto#L95-L104
---
> +++ https://github.com/provenance-io/provenance/blob/723debe379d80419067416316ae07a8aea24dd8a/proto/provenance/quarantine/v1/tx.proto#L94-L103
`04_events.md`
1,4d0
< <!--
< order: 4
< -->
< 
13c9
< `@Type`: `/cosmos.quarantine.v1beta1.EventOptIn`
---
> `@Type`: `/provenance.quarantine.v1.EventOptIn`
23c19
< `@Type`: `/cosmos.quarantine.v1beta1.EventOptOut`
---
> `@Type`: `/provenance.quarantine.v1.EventOptOut`
34c30
< `@Type`: `/cosmos.quarantine.v1beta1.EventFundsQuarantined`
---
> `@Type`: `/provenance.quarantine.v1.EventFundsQuarantined`
45c41
< `@Type`: `/cosmos.quarantine.v1beta1.EventFundsReleased`
---
> `@Type`: `/provenance.quarantine.v1.EventFundsReleased`
`05_queries.md`
1,4d0
< <!--
< order: 5
< -->
< 
14c10
< +++ https://github.com/provenance-io/cosmos-sdk/blob/da2ea8a8139ae9e110de0776baffa1d0dd97db5e/proto/cosmos/quarantine/v1beta1/query.proto#L46-L50
---
> +++ https://github.com/provenance-io/provenance/blob/723debe379d80419067416316ae07a8aea24dd8a/proto/provenance/quarantine/v1/query.proto#L44-L48
18c14
< +++ https://github.com/provenance-io/cosmos-sdk/blob/da2ea8a8139ae9e110de0776baffa1d0dd97db5e/proto/cosmos/quarantine/v1beta1/query.proto#L52-L56
---
> +++ https://github.com/provenance-io/provenance/blob/723debe379d80419067416316ae07a8aea24dd8a/proto/provenance/quarantine/v1/query.proto#L50-L54
29c25
< +++ https://github.com/provenance-io/cosmos-sdk/blob/da2ea8a8139ae9e110de0776baffa1d0dd97db5e/proto/cosmos/quarantine/v1beta1/query.proto#L58-L67
---
> +++ https://github.com/provenance-io/provenance/blob/723debe379d80419067416316ae07a8aea24dd8a/proto/provenance/quarantine/v1/query.proto#L56-L65
33c29
< +++ https://github.com/provenance-io/cosmos-sdk/blob/da2ea8a8139ae9e110de0776baffa1d0dd97db5e/proto/cosmos/quarantine/v1beta1/query.proto#L69-L76
---
> +++ https://github.com/provenance-io/provenance/blob/723debe379d80419067416316ae07a8aea24dd8a/proto/provenance/quarantine/v1/query.proto#L67-L74
37c33
< +++ https://github.com/provenance-io/cosmos-sdk/blob/da2ea8a8139ae9e110de0776baffa1d0dd97db5e/proto/cosmos/quarantine/v1beta1/quarantine.proto#L10-L21
---
> +++ https://github.com/provenance-io/provenance/blob/723debe379d80419067416316ae07a8aea24dd8a/proto/provenance/quarantine/v1/quarantine.proto#L10-L21
57c53
< +++ https://github.com/provenance-io/cosmos-sdk/blob/da2ea8a8139ae9e110de0776baffa1d0dd97db5e/proto/cosmos/quarantine/v1beta1/query.proto#L78-L87
---
> +++ https://github.com/provenance-io/provenance/blob/723debe379d80419067416316ae07a8aea24dd8a/proto/provenance/quarantine/v1/query.proto#L76-L85
61c57
< +++ https://github.com/provenance-io/cosmos-sdk/blob/da2ea8a8139ae9e110de0776baffa1d0dd97db5e/proto/cosmos/quarantine/v1beta1/query.proto#L89-L96
---
> +++ https://github.com/provenance-io/provenance/blob/723debe379d80419067416316ae07a8aea24dd8a/proto/provenance/quarantine/v1/query.proto#L87-L94
65c61
< +++ https://github.com/provenance-io/cosmos-sdk/blob/da2ea8a8139ae9e110de0776baffa1d0dd97db5e/proto/cosmos/quarantine/v1beta1/quarantine.proto#L23-L31
---
> +++ https://github.com/provenance-io/provenance/blob/723debe379d80419067416316ae07a8aea24dd8a/proto/provenance/quarantine/v1/quarantine.proto#L23-L31
`06_client.md`
1,4d0
< <!--
< order: 6
< -->
< 
30c26
< $ simd tx quarantine opt-in --help
---
> $ provenanced tx quarantine opt-in --help
35c31
<   simd tx quarantine opt-in [<to_name_or_address>] [flags]
---
>   provenanced tx quarantine opt-in [<to_name_or_address>] [flags]
39,42c35,38
< $ simd tx quarantine opt-in cosmos1c7p4v02eayvag8nswm4f5q664twfe6dxjha389
< $ simd tx quarantine opt-in personal
< $ simd tx quarantine opt-in --from cosmos1c7p4v02eayvag8nswm4f5q664twfe6dxjha389
< $ simd tx quarantine opt-in --from personal
---
> $ provenanced tx quarantine opt-in pb1c7p4v02eayvag8nswm4f5q664twfe6dxmek52e
> $ provenanced tx quarantine opt-in personal
> $ provenanced tx quarantine opt-in --from pb1c7p4v02eayvag8nswm4f5q664twfe6dxmek52e
> $ provenanced tx quarantine opt-in --from personal
48c44
< $ simd tx quarantine opt-out --help
---
> $ provenanced tx quarantine opt-out --help
53c49
<   simd tx quarantine opt-out [<to_name_or_address>] [flags]
---
>   provenanced tx quarantine opt-out [<to_name_or_address>] [flags]
57,60c53,56
< $ simd tx quarantine opt-out cosmos1c7p4v02eayvag8nswm4f5q664twfe6dxjha389
< $ simd tx quarantine opt-out personal
< $ simd tx quarantine opt-out --from cosmos1c7p4v02eayvag8nswm4f5q664twfe6dxjha389
< $ simd tx quarantine opt-out --from personal
---
> $ provenanced tx quarantine opt-out pb1c7p4v02eayvag8nswm4f5q664twfe6dxmek52e
> $ provenanced tx quarantine opt-out personal
> $ provenanced tx quarantine opt-out --from pb1c7p4v02eayvag8nswm4f5q664twfe6dxmek52e
> $ provenanced tx quarantine opt-out --from personal
66c62
< $ ./build/simd tx quarantine accept --help
---
> $ provenanced tx quarantine accept --help
71c67
<   simd tx quarantine accept <to_name_or_address> <from_address> [<from_address 2> ...] [flags]
---
>   provenanced tx quarantine accept <to_name_or_address> <from_address> [<from_address 2> ...] [flags]
75,77c71,73
< $ simd tx quarantine accept cosmos1c7p4v02eayvag8nswm4f5q664twfe6dxjha389 cosmos1ld2qyt9pq5n8dxkp58jn3jyxh8u8ztmrk9vrut
< $ simd tx quarantine accept personal cosmos1ld2qyt9pq5n8dxkp58jn3jyxh8u8ztmrk9vrut
< $ simd tx quarantine accept personal cosmos1ld2qyt9pq5n8dxkp58jn3jyxh8u8ztmrk9vrut cosmos1phx24ecmuw3s7fmy8c87gh3rdq5lwskqur3t00
---
> $ provenanced tx quarantine accept pb1c7p4v02eayvag8nswm4f5q664twfe6dxmek52e pb1ld2qyt9pq5n8dxkp58jn3jyxh8u8ztmrlt8x3h
> $ provenanced tx quarantine accept personal pb1ld2qyt9pq5n8dxkp58jn3jyxh8u8ztmrlt8x3h
> $ provenanced tx quarantine accept personal pb1ld2qyt9pq5n8dxkp58jn3jyxh8u8ztmrlt8x3h pb1phx24ecmuw3s7fmy8c87gh3rdq5lwskq4d6wzn
91c87
< $ simd tx quarantine decline --help
---
> $ provenanced tx quarantine decline --help
96c92
<   simd tx quarantine decline <to_name_or_address> <from_address> [<from_address 2> ...] [flags]
---
>   provenanced tx quarantine decline <to_name_or_address> <from_address> [<from_address 2> ...] [flags]
100,102c96,98
< $ simd tx quarantine decline cosmos1c7p4v02eayvag8nswm4f5q664twfe6dxjha389 cosmos1ld2qyt9pq5n8dxkp58jn3jyxh8u8ztmrk9vrut
< $ simd tx quarantine decline personal cosmos1ld2qyt9pq5n8dxkp58jn3jyxh8u8ztmrk9vrut
< $ simd tx quarantine decline personal cosmos1ld2qyt9pq5n8dxkp58jn3jyxh8u8ztmrk9vrut cosmos1phx24ecmuw3s7fmy8c87gh3rdq5lwskqur3t00
---
> $ provenanced tx quarantine decline pb1c7p4v02eayvag8nswm4f5q664twfe6dxmek52e pb1ld2qyt9pq5n8dxkp58jn3jyxh8u8ztmrlt8x3h
> $ provenanced tx quarantine decline personal pb1ld2qyt9pq5n8dxkp58jn3jyxh8u8ztmrlt8x3h
> $ provenanced tx quarantine decline personal pb1ld2qyt9pq5n8dxkp58jn3jyxh8u8ztmrlt8x3h pb1phx24ecmuw3s7fmy8c87gh3rdq5lwskq4d6wzn
116c112
< $ simd tx quarantine update-auto-responses --help
---
> $ provenanced tx quarantine update-auto-responses --help
132c128
<   simd tx quarantine update-auto-responses <to_name_or_address> <auto-response> <from_address> [<from_address 2> ...] [<auto-response 2> <from_address 3> [<from_address 4> ...] ...] [flags]
---
>   provenanced tx quarantine update-auto-responses <to_name_or_address> <auto-response> <from_address> [<from_address 2> ...] [<auto-response 2> <from_address 3> [<from_address 4> ...] ...] [flags]
139,141c135,137
< $ simd tx quarantine update-auto-responses cosmos1c7p4v02eayvag8nswm4f5q664twfe6dxjha389 accept cosmos1ld2qyt9pq5n8dxkp58jn3jyxh8u8ztmrk9vrut
< $ simd tx quarantine update-auto-responses personal decline cosmos1phx24ecmuw3s7fmy8c87gh3rdq5lwskqur3t00 unspecified cosmos1lfuwk97g6y9du8altct63vwgz5620t929n8g9l
< $ simd tx quarantine auto-responses personal accept cosmos1ld2qyt9pq5n8dxkp58jn3jyxh8u8ztmrk9vrut cosmos1qsjw3kjaf33qk2urxg54lzxkw525ngghzneujh off cosmos1lfuwk97g6y9du8altct63vwgz5620t929n8g9l
---
> $ provenanced tx quarantine update-auto-responses pb1c7p4v02eayvag8nswm4f5q664twfe6dxmek52e accept pb1ld2qyt9pq5n8dxkp58jn3jyxh8u8ztmrlt8x3h
> $ provenanced tx quarantine update-auto-responses personal decline pb1phx24ecmuw3s7fmy8c87gh3rdq5lwskq4d6wzn unspecified pb1lfuwk97g6y9du8altct63vwgz5620t92vavdgr
> $ provenanced tx quarantine auto-responses personal accept pb1ld2qyt9pq5n8dxkp58jn3jyxh8u8ztmrlt8x3h pb1qsjw3kjaf33qk2urxg54lzxkw525ngghtajelt off pb1lfuwk97g6y9du8altct63vwgz5620t92vavdgr
152c148
< $ simd query quarantine is-quarantined --help
---
> $ provenanced query quarantine is-quarantined --help
156,157c152,153
<   $ simd query quarantine is-quarantined cosmos1c7p4v02eayvag8nswm4f5q664twfe6dxjha389
<   $ simd query quarantine is cosmos1ld2qyt9pq5n8dxkp58jn3jyxh8u8ztmrk9vrut
---
>   $ provenanced query quarantine is-quarantined pb1c7p4v02eayvag8nswm4f5q664twfe6dxmek52e
>   $ provenanced query quarantine is pb1ld2qyt9pq5n8dxkp58jn3jyxh8u8ztmrlt8x3h
160c156
<   simd query quarantine is-quarantined <to_address> [flags]
---
>   provenanced query quarantine is-quarantined <to_address> [flags]
169c165
< simd query quarantine funds --help
---
> provenanced query quarantine funds --help
177,179c173,175
<   $ simd query quarantine funds
<   $ simd query quarantine funds cosmos1c7p4v02eayvag8nswm4f5q664twfe6dxjha389
<   $ simd query quarantine funds cosmos1c7p4v02eayvag8nswm4f5q664twfe6dxjha389 cosmos1ld2qyt9pq5n8dxkp58jn3jyxh8u8ztmrk9vrut
---
>   $ provenanced query quarantine funds
>   $ provenanced query quarantine funds pb1c7p4v02eayvag8nswm4f5q664twfe6dxmek52e
>   $ provenanced query quarantine funds pb1c7p4v02eayvag8nswm4f5q664twfe6dxmek52e pb1ld2qyt9pq5n8dxkp58jn3jyxh8u8ztmrlt8x3h
182c178
<   simd query quarantine funds [<to_address> [<from_address>]] [flags]
---
>   provenanced query quarantine funds [<to_address> [<from_address>]] [flags]
190c186
< $ simd query quarantine auto-responses --help
---
> $ provenanced query quarantine auto-responses --help
197,198c193,194
<   $ simd query quarantine auto-responses cosmos1c7p4v02eayvag8nswm4f5q664twfe6dxjha389
<   $ simd query quarantine auto-responses cosmos1c7p4v02eayvag8nswm4f5q664twfe6dxjha389 cosmos1ld2qyt9pq5n8dxkp58jn3jyxh8u8ztmrk9vrut
---
>   $ provenanced query quarantine auto-responses pb1c7p4v02eayvag8nswm4f5q664twfe6dxmek52e
>   $ provenanced query quarantine auto-responses pb1c7p4v02eayvag8nswm4f5q664twfe6dxmek52e pb1ld2qyt9pq5n8dxkp58jn3jyxh8u8ztmrlt8x3h
201c197
<   simd query quarantine auto-responses <to_address> [<from_address>] [flags]
---
>   provenanced query quarantine auto-responses <to_address> [<from_address>] [flags]
213,220c209,216
< | Name                        | URL                                                            |
< |-----------------------------|----------------------------------------------------------------|
< | IsQuarantined               | `/cosmos/quarantine/v1beta1/active/{to_address}`               |
< | QuarantinedFunds - all      | `/cosmos/quarantine/v1beta1/funds`                             |
< | QuarantinedFunds - some     | `/cosmos/quarantine/v1beta1/funds/{to_address}`                |
< | QuarantinedFunds - specific | `/cosmos/quarantine/v1beta1/funds/{to_address}/{from_address}` |
< | AutoResponses - some        | `/cosmos/quarantine/v1beta1/auto/{to_address}`                 |
< | AutoResponses - specific    | `/cosmos/quarantine/v1beta1/auto/{to_address}/{from_address}`  |
---
> | Name                        | URL                                                           |
> |-----------------------------|---------------------------------------------------------------|
> | IsQuarantined               | `/provenance/quarantine/v1/active/{to_address}`               |
> | QuarantinedFunds - all      | `/provenance/quarantine/v1/funds`                             |
> | QuarantinedFunds - some     | `/provenance/quarantine/v1/funds/{to_address}`                |
> | QuarantinedFunds - specific | `/provenance/quarantine/v1/funds/{to_address}/{from_address}` |
> | AutoResponses - some        | `/provenance/quarantine/v1/auto/{to_address}`                 |
> | AutoResponses - specific    | `/provenance/quarantine/v1/auto/{to_address}/{from_address}`  |

@SpicyLemon
Copy link
Contributor Author

After some discussion, we think it might be best to create a new repo to house these two modules (and maybe our own copy of the bank module). Ideally, that will let us keep the protos in the same package they're currently in.

@SpicyLemon SpicyLemon closed this Nov 28, 2023
@SpicyLemon
Copy link
Contributor Author

Changed my mind. Gonna put it into the provenance repo. Issue re-opened as #1902

@SpicyLemon SpicyLemon deleted the dwedul/1752-copy-quarantine-in branch December 4, 2024 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move quarantine module into the provenance repo
1 participant